| overplotDataset {GCDkit} | R Documentation |
This function allows overplotting new data points stored in the memory onto any type of single Figaro-compatible plots (or their plates). This can be done either into foreground or into background.
overplotDataset(reference.dataset=NULL, underplotting=FALSE, transp=0,
pch=NULL, col=NULL, cex=NULL, ...)
underplotDataset(reference.dataset=NULL, transp=0,...)
reference.dataset |
object name (given as a character string or unquoted); the dataset to be added to the current diagram. See Details. |
underplotting |
logical; should be the reference dataset added at the background? |
transp |
numeric, 0-1; transparency of the background dataset (in underplotting). |
pch |
plotting symbol(s) for the foreground dataset. |
col |
plotting colour(s) for the foreground dataset. |
cex |
numeric; relative size of the plotting symbol(s) for the foreground dataset. |
... |
additional parameters to the underlying plotting function(s). See Details. |
These are front-ends to the functions 'figOverplot' and 'figOverplotDiagram',
invoked as appropriate. However, the functions 'overplotDataset' and 'underplotDataset'
work correctly also on plates.
Also underplotDataset is just a convenience function, calling
overplotDataset with the parameter underplotting=TRUE.
Most typically, reference.dataset is a (quoted) name of a dataset stored in memory.
Alternatively, a (unquoted) name of a global variable can be specified.
Plotting parameters 'pch', 'col' and 'cex' are available only
for overplotting.
On the other hand, transparency can be set only in underplotting. See 'setTransparency' for further info.
Argument '...' can supply additional parameters to the original plotting functions
(e.g., 'TAS') invoked by 'plotDiagram' or 'plateExtract'.
(Invisibly) name of the reference dataset.
This function is a front-end, truly a 'mother of all' specialized and less versatile
overplotting functions such as 'figOverplot', 'figOverplotDiagram' or
'figAddReservoirs(just.draw=TRUE)'. Please use 'overplotDataset' instead, unless
permanent addition to the plot is required. For such cases,
'figAddReservoirs' 'plateAddReservoirs' in their default form, i.e.
with argument just.draw=FALSE, are the functions of choice.
NB that the points for the overplotted dataset do not form a part of the template, and thus will vanish upon redrawing, zooming ....
Vojtěch Janoušek, vojtech.janousek@geology.cz
'figOverplot' 'figOverplotDiagram' 'figAddReservoirs' 'plateAddReservoirs'
'peekDataset' 'pokeDataset' 'purgeDatasets'
'setTransparency' 'plotDiagram' 'plateExtract'
# Loading two testing datasets
sampleDataset("sazava")
sampleDataset("blatna")
setCex(2)
pokeDataset("blatna",overwrite.warn=FALSE) # Store a version with larger symbols
# Simple binary plot
peekDataset("blatna")
binary("SiO2","K2O",col="green",cex=2,xmin=45,xmax=75,ymin=0,ymax=15)
overplotDataset("sazava",cex=2,col="blue",pch="+",transp=0.5)
binary("SiO2","K2O",col="green",cex=2,xmin=45,xmax=75,ymin=0,ymax=15)
underplotDataset("sazava",cex=2,col="blue",pch="+",transp=0.5)
# Simple ternary plot
peekDataset("blatna")
ternary("SiO2/10","K2O","Na2O",col="green",cex=2,pch=2)
overplotDataset("sazava",cex=2,col="red",pch="+",transp=0.5)
ternary("SiO2/10","K2O","Na2O",col="green",cex=2,pch=2)
underplotDataset("sazava",cex=2,col="red",pch="+",transp=0.5)
# Single classification plots
peekDataset("blatna")
plotDiagram("DebonPQ",FALSE,TRUE)
figRemove()
overplotDataset("sazava",cex=2,col="darkred",pch=15,transp=0.5)
plotDiagram("DebonPQ",FALSE,TRUE)
underplotDataset("sazava",cex=2,col="darkred",pch=15,transp=0.5)
peekDataset("blatna")
plateExtract("PearceGranite",2,main=" ")
overplotDataset("sazava",cex=2,col="darkred",pch=15,transp=0.5)
plateExtract("PearceGranite",2,main=" ")
underplotDataset("sazava",cex=2,col="darkred",pch=15,transp=0.5)
# Spiderplots
# Blatna as std patterns
peekDataset("blatna")
spider(WR,"Boynton",1,1000,cex=0,join=TRUE,offset=TRUE,
centered=FALSE,xrotate=FALSE,xaxs="r")
overplotDataset("sazava",cex=1.5,pch="+",col="darkgreen",transp=0.5)
peekDataset("blatna")
spider(WR,"Boynton",1,1000,cex=0,join=TRUE,offset=TRUE,
centered=FALSE,xrotate=FALSE,xaxs="r")
underplotDataset("sazava",cex=1.5,pch="+",col="darkgreen",transp=0.5)
# Blatna as gray field
peekDataset("blatna")
spider(WR,"Boynton",0.1,1000,field=TRUE,fill.col=TRUE,shaded.col="gray")
overplotDataset("sazava",cex=1.5,pch="+",col="darkgreen",transp=0.5)
peekDataset("blatna")
spider(WR,"Boynton",0.1,1000,field=TRUE,fill.col=TRUE,shaded.col="gray")
underplotDataset("sazava",cex=1.5,pch="+",col="darkgreen",transp=0.5)
# A simple plate
peekDataset("blatna")
multiple("SiO2",y="TiO2,Al2O3,FeOt,MgO,CaO,Na2O,K2O,P2O5",nrow=3,ncol=3,main="")
plateCex(1.8)
plateCexLab(1.3)
overplotDataset("sazava",cex=1.5,pch="+",col="darkgreen",transp=0.5,autoscale=TRUE)
# A user-defined plate of classification diagrams
peekDataset("blatna")
multiplePerPage(4,nrow=2,ncol=2,title="A classification plate")
plotDiagram("DebonPQ",FALSE,FALSE,main=" ")
plotDiagram("DebonBA",FALSE,FALSE,main=" ")
plotDiagram("LarocheVolc",FALSE,FALSE,main=" ")
plotDiagram("Meschede",FALSE,FALSE,main=" ")
plateLabelSlots(text=letters,cex=1.5,pos="topleft")
plateUser(cex=2,col="darkblue",cex.lab=1.2)
overplotDataset("sazava",cex=2,col=2,pch="+",transp=0.5)
plateRedraw()
underplotDataset("sazava",transp=0.5)